#ifndef BROWSER_H
#define BROWSER_H

#include<QWidget>
#include<QUrl>
namespace Ui {
class browser;
}

class browser : public QWidget
{
    Q_OBJECT
    
public:
    explicit browser(QWidget *parent = 0);
    ~browser();

private:
    void initUI();
    void initVarList();
    void initConnection();

    void changeTitle();
    QString getTitle();
    void changeUrl(const QString &strUrl);
    QString getUrl();


    void loadUrl(const QUrl &url);

    QUrl urlFromString(const QString &strUrl);
    QString urlToString(const QUrl &url);
public slots:
private slots:
    void on_searchbutton_clicked();
    void setProgress(int p);
    void timerEvent(QTimerEvent *);
//signals:


    void on_homepagepushButton_clicked();

private:
    Ui::browser *ui;/*UI*/
    int m_progress;/*show the webpage`s Loadding Progress value*/
    int m_titleId;/*show Current TimeInfo in TitleBar*/
};

#endif // BROWSER_H
